package com.ccb.sc.common.modules.member.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ccb.sc.common.modules.member.entity.Receiver;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 * 收货地址 Mapper 接口
 * </p>
 *
 * @author ken
 * @since 2020-09-25
 */
public interface ReceiverMapper extends BaseMapper<Receiver> {

    @Update({
            "<script>",
            "update",
            "tb_receiver",
            "set is_default=0",
            "where member_id=#{memberId} ",
            "</script>"
    })
    void removeDefault(Long memberId);

}
